import { LeftOutlined } from "@ant-design/icons";

interface NavProps {
  name: string;
  router: string;
}

/* 导航 */
const Nav = ({ name, router }: NavProps): JSX.Element => (
  <p className="w-full h-48 text-base font-medium flex items-center pl-14 text-black bg-white">
    <span
      className="flex items-center cursor-pointer"
      onClick={() => {
        window.globalState.muState("history", { type: "push", pathname: router });
      }}>
      <LeftOutlined />
      {name}
    </span>
  </p>
);

export default Nav;
